package chapter6;

public class CarExam {

	public static void main(String[] args) {
		Car inbus = new InBus();
		Car outbus = new OutBus();
		Car intaxi = new InTaxi();
		Car citytaxi = new CityTaxi();
		
		
		Car []car={inbus,outbus,intaxi,citytaxi};
		for (int a=0 ; a<car.length ;a++ ){
			car[a].drive();
			
			
			
		}
	}
}
